﻿using System.Linq;
using Migration.Models;
using System.Collections.Generic;
namespace Migration
{
    public partial class TransactionStatusEntities
    {
        private RealestateDataContext dataContext = new RealestateDataContext();

        public void Add(TransactionStatus item)
        {
            dataContext.TransactionStatus.InsertOnSubmit(item);
            dataContext.SubmitChanges();
        }              

        public TransactionStatus GetById(int id)
        {
            var item = (from c in dataContext.TransactionStatus where c.TransactionId == id select c).FirstOrDefault();
            return item;
        }       
    }
}